#ifndef F_CAUTEmuTMTCServerE_h
#define F_CAUTEmuTMTCServerE_h


//******************************************************************************
// EDROOM Service Library

#define _EDROOM_IS_DEBUG_

#define _EDROOM_IS_EMBEDDED_

#include <public/edroomsl.h>

// Data Classes

#include <public/cdtmtccommserver.h>
#include <public/cddataburst.h>

//******************************************************************************
// Required Components

#include <public/PackMemManager.h>
#include <public/stdio.h>
#include <public/crc_16.h>


#include <cautemutmtcserver/required_swi.h>
//******************************************************************************
// Component Class   CAUTEmuTMTCServer

class CAUTEmuTMTCServer: public CEDROOMComponent {

public:

	//*********************** Component Signal Enum Type ***********************

	 enum EDROOMCAUTEmuTMTCServerSignal { EDROOMSignalTimeout, EDROOMSignalDestroy, EmuGSDoublePackList, STMTCPackList, STMDoublePackList, SFinalTCPackets, STCPackList };

	//***************************** Component Memory ***************************

	class CEDROOMMemory: public CEDROOMComponentMemory{

		private:

			//CQueueHead

			CEDROOMQueue::CQueueHead QueueHeads[EDROOMprioMINIMUM+1];

			//Pools

			public:

			CDTMTCCommServer	poolCDTMTCCommServer[3];
			TEDROOMBool	poolMarkCDTMTCCommServer[3];


			// SetMemory
			void SetMemory(TEDROOMUInt32 numMessages_, CEDROOMMessage * MessagesMem_, TEDROOMBool * MessagesMemMarks_, CEDROOMQueue::CQueueNode * QueueNodesMem_, TEDROOMBool * QueueNodesMemMarks_);

	};


	//*****************************	Component Ports ****************************

	CEDROOMInterface	SgiTMTCServer2;
	CEDROOMInterface	SgiTMTCServer;




	// ******************************** Constructor ****************************

	CAUTEmuTMTCServer(const char * const roomname, TEDROOMComponentID id, TEDROOMUInt32 roomNumMaxMens, TEDROOMPriority roomtaskPrio, TEDROOMStackSizeType roomStack, CEDROOMMemory * pActorMemory );




	// *************************************************************************

	// **************************** Public Methods	****************************

	// *************************************************************************



	// **************************** Configuration ******************************

	 int EDROOMConfig();


	// ************************************* Start *****************************

	 int EDROOMStart();




	#ifdef _EDROOM_SYSTEM_CLOSE

	// ***************************** IsComponentFinished ***********************

	TEDROOMBool EDROOMIsComponentFinished();


	#endif

	// *************************************************************************

	// **************************** Protected Methods	************************

	// *************************************************************************

protected:



	// *********************************** Behaviour ***************************

	virtual void EDROOMBehaviour();




public:

	// *****************************	Behaviour File *************************

	#include <cautemutmtcserver/CAUTEmuTMTCServerC.h>


protected:

	// ********************************  Top State  ****************************

	EDROOMTopState edroomTopState;



};
#endif
